package cn.kgc.service.impl;

import cn.kgc.dao.GUserDao;
import cn.kgc.pojo.GUser;
import cn.kgc.service.GUserService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: X9527M
 * @date: 2022/2/25
 * @description:
 */
@Service
public class GUserServiceImpl implements GUserService {
    @Resource
    private GUserDao gd;

    @Override
    public Page<GUser> GUser(String userName, String rname, String brName) {
        return gd.GUsers(userName, rname, brName);
    }

    @Override
    public boolean del(int id) {
        return gd.del(id) > 0;
    }

    @Override
    public boolean add(GUser GUser) {
        return gd.add(GUser)>0;
    }

    @Override
    public boolean findByUserCode(String userCode) {
        GUser GUser = gd.findByUserCode(userCode);
        return GUser == null;
    }


    @Override
    public List<GUser> selId(int id) {
        return gd.selId(id);
    }

    @Override
    public boolean upd(GUser GUser) {
        return gd.upd(GUser) > 0;
    }
}
